﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JBeamLibrary.VehicleParts
{
    public enum BeamType
    {
        Unspecified = -1,
        Normal,
        Bounded,
        Hydro,
        Anisotropic,
        Pressured,
        Support,
        Broken
    }

    public static class BeamTypes
    {
        public const string Normal = "|NORMAL";
        public const string Bounded = "|BOUNDED";
        public const string Hydro = "|HYDRO";
        public const string Anisotropic = "|ANISOTROPIC";
        public const string Pressured = "|PRESSURED";
        public const string Support = "|SUPPORT";
        public const string Broken = "|BROKEN";

        public static string GetStringValue(BeamType btp)
        {
            switch (btp)
            {
                case BeamType.Normal:
                    return Normal;
                case BeamType.Bounded:
                    return Bounded;
                case BeamType.Anisotropic:
                    return Anisotropic;
                case BeamType.Hydro:
                    return Hydro;
                case BeamType.Pressured:
                    return Pressured;
                case BeamType.Support:
                    return Support;
                case BeamType.Broken:
                    return Broken;
            }
            return string.Empty;
        }

        public static BeamType GetEnumValue(string beamType)
        {
            switch (beamType)
            {
                case Normal:
                    return BeamType.Normal;
                case Bounded:
                    return BeamType.Bounded;
                case Anisotropic:
                    return BeamType.Anisotropic;
                case Hydro:
                    return BeamType.Hydro;
                case Pressured:
                    return BeamType.Pressured;
                case Support:
                    return BeamType.Support;
                case Broken:
                    return BeamType.Broken;
                default:
                    return BeamType.Unspecified;
            }
        }
    }
}
